<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php if($oUser['usertype']==1):?>个人主页<?php else:?>机构主页<?php endif?>-魔步网</title>
<?php include_once(VIEWPATH."public/header_title.php");?>
<link href="<?php echo _get_cfg_path('css')?>base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('css')?>common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('lib')?>uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery-1.9.1.min.js"></script>
<?php /*?><script type="text/javascript" src="<?php echo _get_cfg_path('js')?>waterfall.js"></script><?php */?>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>common.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>main.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>blocksit.min.js"></script>
<!--[if IE 6]>
<script src="<?php echo _get_cfg_path('js')?>DD_belatedPNG.js" type="text/javascript" ></script>
<script>DD_belatedPNG.fix('a,img');</script>
<![endif]-->
<style>
#container{position:relative;width:100%;}
.grid{width:540px;min-height:100px;float:left;}
</style>
</head>
<body>
<?php include_once(VIEWPATH."public/header.php");?>
<div class="mainbody" id="mainbody">
	<div class="introd container">
    	<?php if ($oUser['usertype'] == 2) include_once(VIEWPATH."i/public/top_ins.php");else include_once(VIEWPATH."i/public/top.php");?>
        <?php /*?><div class="malbumdeta">
            <div class="brand-list" id="brand-waterfall">
                <?php foreach ($list as $key => $a): ?>
                <div class="item"><img src="<?=$a['img']?>"/></div>
                <?php endforeach;?>
            </div>
        </div><?php */?>
    	<div class="malbumdeta" id="container">
			<?php foreach ($list as $key => $a): ?>
            <div class="grid"><img src="<?=$a['img']?>"/></div>
            <?php endforeach;?>
        </div>
    </div>
</div>
<!--mainbody-->
<?php include_once(VIEWPATH."public/footer.php");?>
<script type="text/javascript">
$(document).ready(function() {
	//blocksit define
	$(window).load( function() {
		$('#container').BlocksIt({
			numOfCol: 2,
			offsetX: 6,
			offsetY: 6
		});
	});
	
	//window resize
	var currentWidth = 1100;
	$(window).resize(function() {
		var winWidth = $(window).width();
		var conWidth;
		if(winWidth < 660) {
			conWidth = 440;
			col = 2
		} else if(winWidth < 880) {
			conWidth = 660;
			col = 3
		} else if(winWidth < 1100) {
			conWidth = 880;
			col = 4;
		} else {
			conWidth = 1100;
			col = 5;
		}
		
		if(conWidth != currentWidth) {
			currentWidth = conWidth;
			$('#container').width(conWidth);
			$('#container').BlocksIt({
				numOfCol: col,
				offsetX: 6,
				offsetY: 6
			});
		}
	});
});
</script>
</body>
</html>